//
//  logApi.swift
//  AnShiPai
//
//  Created by 马瑜 on 2017/7/6.
//  Copyright © 2017年 马瑜. All rights reserved.
//

import UIKit

class logAPI: NSObject {
    static func log(_ message: Any, function: String = #function) {
        #if DEBUG
            print("\(function): \(message)")
        #endif
    }
    
    
    
    @nonobjc
    static func log(_ message: AnyObject?, function: String = #function) {
        #if DEBUG
            print("\(function): \(message)")
        #endif
    }
    
    static func error(_ message: AnyObject?, function: String = #function, content: AnyObject) {
        #if DEGUG
            print("\(function): \(message), content: \(content)")
        #else
            let nsContent = NSString(string: content as! String)
            let nsMessage = message
            let params = ["message": "\(nsMessage)", "content": "\(nsContent)"]
            print(params)
        #endif
    }

}
